package com.base.cn.platform.os.controller.qa.qaadd;

import com.base.cn.platform.os.common.AdminBaseController;
import com.base.cn.platform.os.common.log.aop.AdminModuleEnum;
import com.base.cn.platform.os.common.log.aop.OpLog;
import com.base.cn.platform.os.service.course.qa.qaadd.QaAddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * 后台追问Controller
 *
 * @author LIZHIPENG
 * @create 2018-05-29 下午 4:28
 */
@Controller
@RequestMapping("/admin/qa/add")
public class AdminQaAddController extends AdminBaseController {

    @Autowired
    private QaAddService qaAddService;

    /**
     * 后台保存追答内容
     * @param params 追答内容信息
     * @return Map<String, Object>
     */
    @RequestMapping("/saveQuestionAddAnswer")
    @ResponseBody
    @OpLog(module = AdminModuleEnum.OTHER, action = "保存追问回答")
    public Map<String, Object> saveQuestionAddAnswer(@RequestBody Map<String, Object> params){
        return qaAddService.saveQuestionAddAnswer(params);
    }
}
